From: Ivan Molodetskikh Date: Thu, 3 Feb 2022 19:40:23 +0000 (+0300) Subject: screenshot-ui: Extract binding modes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~52 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=414592acf910573beaee6c7709b3052d398f1743;p=gnome-shell.git screenshot-ui: Extract binding modes We will re-use the same modes for more bindings in subsequent commits. Also, while we're at it, invert the modes, to emphasize where the screenshot UI cannot be used, rather than where it can be used. Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index ad81c5512..2b70d1d0c 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -1275,15 +1275,17 @@ var ScreenshotUI = GObject.registerClass({ this._rebuildMonitorBins(); }); + const uiModes = + Shell.ActionMode.ALL & + ~(Shell.ActionMode.LOCK_SCREEN | + Shell.ActionMode.UNLOCK_SCREEN | + Shell.ActionMode.LOGIN_SCREEN); + Main.wm.addKeybinding( 'show-screenshot-ui', new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }), Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, - Shell.ActionMode.NORMAL | - Shell.ActionMode.OVERVIEW | - Shell.ActionMode.SYSTEM_MODAL | - Shell.ActionMode.LOOKING_GLASS | - Shell.ActionMode.POPUP, + uiModes, showScreenshotUI ); }